
#define FIN   fflush(stdout);  MPI_Finalize (); exit(0)
//#define DEFA  printf("\033[22;32m")
#define DEFA  printf("\033[01;37m")
#define BLACK    printf("\033[22;30m")
#define RED      printf("\033[22;31m")
#define GREEN    printf("\033[22;32m") 
#define BROWN    printf("\033[22;33m") 
#define BLUE     printf("\033[22;34m") 
#define MAGENTA  printf("\033[22;35m") 
#define CYAN     printf("\033[22;36m") 
#define GRAY     printf("\033[22;37m") 
#define DGRAY    printf("\033[01;30m") 
#define LRED     printf("\033[01;31m") 
#define LGREEN   printf("\033[01;32m") 
#define YELLOW   printf("\033[01;33m") 
#define LBLUE    printf("\033[01;34m") 
#define LMAGENTA printf("\033[01;35m") 
#define LCYAN    printf("\033[01;36m") 
#define WHITE    printf("\033[01;37m")

int moco(const char *message)
{
	RED  ;
	printf(message);
        fflush(stdout);
        DEFA ;
	return 0;
}

size_t my_fread(void *ptr, size_t size, size_t nmemb, FILE * stream)
{
  size_t nread;

  if((nread = fread(ptr, size, nmemb, stream)) != nmemb)
    {
      moco("I/O error (fread)\n");
      exit(3);
    }
  return nread;
}

size_t skip(FILE * stream)
{
  int dummy;

  if(fread(&dummy, sizeof(dummy), 1, stream) !=1)
  {
      moco("Skip failed\n");
      exit(3);
  }
  return 1;
}


